package com.blb.community_admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.blb.community_admin.entity.SysDept;
import com.blb.community_admin.entity.SysMenu;
import com.blb.community_admin.entity.SysRole;
import com.blb.community_admin.entity.SysUser;

import java.util.List;

public interface SysUserMapper extends BaseMapper<SysUser> {
    /**
     * 通过用户名查询用户的权限
     * @param username
     * @return
     */
    List<SysMenu> selectMenusByUsername(String username);

    //查询全部
//    IPage<SysUser> getAllUser(IPage<SysUser> page);
    IPage<SysUser> getAllUser(IPage<SysUser> page, SysUser sysUser);

    //修改状态
    void updateStatus(SysUser sysUser);

    //根据用户名查询用户
    SysUser selectByName(String userName);

    //根据id修改部分内容
    void selectUpdateById(SysUser sysUser);

    void updatePassword(long userId, String newpassword);

    //重置密码
    void selectUpdatePassword(SysUser sysUser);
}
